import { IReqChoose, IReqChooseList, IReqHomeItem,IReqTab,IReqTabList, categoryItemList } from '@/types/home'
import { wyyxHttp } from '@/utils/request.ts'
import axios from 'axios'

/**
 * @description 获取首页内容
 * @returns
 */
export const reqHomeItems = () => {
  return wyyxHttp<IReqHomeItem>(
    '/xhr/index.json?csrf_token=5a6ca427d64ebaedbace8142f8c80c5d&__timestamp=1691207295450&',
    'GET'
  )
}

/**
 * @description 获取tag滚动标签列表
 * @returns
 */
export const reqHomeCateList = (id: number = 1005000) => {
  return axios({
    url: `wyyx/item/list.json?categoryId=${id}`,
    method: 'GET'
  })
}

/**
 * @description 获取为你精选
 * @param params 
 * @returns 
 */
export const reqHomeItemList = (params: IReqChooseList) => {
  return wyyxHttp<IReqChoose>(
    'xhr/index/items.json?csrf_token=c57095aa7ca747840ddee52db536abfc',
    'POST',
    params
  )
}
